3.13.61 \(\int \frac {x^3 (a+b \arctan (c x))^2}{d+e x^2} \, dx\) [1261]

3.13.61.1 Optimal result
3.13.61.2 Mathematica [B] (warning: unable to verify)
3.13.61.3 Rubi [A] (verified)
3.13.61.4 Maple [F]
3.13.61.5 Fricas [F]
3.13.61.6 Sympy [F]
3.13.61.7 Maxima [F]
3.13.61.8 Giac [F]
3.13.61.9 Mupad [F(-1)]

3.13.61.1 Optimal result

Integrand size = 23, antiderivative size = 590 \[ \int \frac {x^3 (a+b \arctan (c x))^2}{d+e x^2} \, dx=-\frac {a b x}{c e}-\frac {b^2 x \arctan (c x)}{c e}+\frac {(a+b \arctan (c x))^2}{2 c^2 e}+\frac {x^2 (a+b \arctan (c x))^2}{2 e}+\frac {d (a+b \arctan (c x))^2 \log \left (\frac {2}{1-i c x}\right )}{e^2}-\frac {d (a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^2}-\frac {d (a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^2}+\frac {b^2 \log \left (1+c^2 x^2\right )}{2 c^2 e}-\frac {i b d (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1-i c x}\right )}{e^2}+\frac {i b d (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^2}+\frac {i b d (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^2}+\frac {b^2 d \operatorname {PolyLog}\left (3,1-\frac {2}{1-i c x}\right )}{2 e^2}-\frac {b^2 d \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 e^2}-\frac {b^2 d \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{4 e^2} \]

output
-a*b*x/c/e-b^2*x*arctan(c*x)/c/e+1/2*(a+b*arctan(c*x))^2/c^2/e+1/2*x^2*(a+ 
b*arctan(c*x))^2/e+d*(a+b*arctan(c*x))^2*ln(2/(1-I*c*x))/e^2+1/2*b^2*ln(c^ 
2*x^2+1)/c^2/e-1/2*d*(a+b*arctan(c*x))^2*ln(2*c*((-d)^(1/2)-x*e^(1/2))/(1- 
I*c*x)/(c*(-d)^(1/2)-I*e^(1/2)))/e^2-1/2*d*(a+b*arctan(c*x))^2*ln(2*c*((-d 
)^(1/2)+x*e^(1/2))/(1-I*c*x)/(c*(-d)^(1/2)+I*e^(1/2)))/e^2-I*b*d*(a+b*arct 
an(c*x))*polylog(2,1-2/(1-I*c*x))/e^2+1/2*I*b*d*(a+b*arctan(c*x))*polylog( 
2,1-2*c*((-d)^(1/2)-x*e^(1/2))/(1-I*c*x)/(c*(-d)^(1/2)-I*e^(1/2)))/e^2+1/2 
*I*b*d*(a+b*arctan(c*x))*polylog(2,1-2*c*((-d)^(1/2)+x*e^(1/2))/(1-I*c*x)/ 
(c*(-d)^(1/2)+I*e^(1/2)))/e^2+1/2*b^2*d*polylog(3,1-2/(1-I*c*x))/e^2-1/4*b 
^2*d*polylog(3,1-2*c*((-d)^(1/2)-x*e^(1/2))/(1-I*c*x)/(c*(-d)^(1/2)-I*e^(1 
/2)))/e^2-1/4*b^2*d*polylog(3,1-2*c*((-d)^(1/2)+x*e^(1/2))/(1-I*c*x)/(c*(- 
d)^(1/2)+I*e^(1/2)))/e^2
 
3.13.61.2 Mathematica [B] (warning: unable to verify)

Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(1520\) vs. \(2(590)=1180\).

Time = 13.44 (sec) , antiderivative size = 1520, normalized size of antiderivative = 2.58 \[ \int \frac {x^3 (a+b \arctan (c x))^2}{d+e x^2} \, dx =\text {Too large to display} \]

input
Integrate[(x^3*(a + b*ArcTan[c*x])^2)/(d + e*x^2),x]
 
output
(-4*a*b*c*e*x + 2*a^2*c^2*e*x^2 + 4*a*b*e*ArcTan[c*x] - 4*b^2*c*e*x*ArcTan 
[c*x] + 4*a*b*c^2*e*x^2*ArcTan[c*x] + 2*b^2*e*ArcTan[c*x]^2 + 2*b^2*c^2*e* 
x^2*ArcTan[c*x]^2 - (8*I)*a*b*c^2*d*ArcSin[Sqrt[(c^2*d)/(c^2*d - e)]]*ArcT 
an[(c*e*x)/Sqrt[c^2*d*e]] + 8*a*b*c^2*d*ArcTan[c*x]*Log[1 + E^((2*I)*ArcTa 
n[c*x])] + 4*b^2*c^2*d*ArcTan[c*x]^2*Log[1 + E^((2*I)*ArcTan[c*x])] + 4*a* 
b*c^2*d*ArcSin[Sqrt[(c^2*d)/(c^2*d - e)]]*Log[1 + ((c^2*d + e + 2*Sqrt[c^2 
*d*e])*E^((2*I)*ArcTan[c*x]))/(c^2*d - e)] - 4*a*b*c^2*d*ArcTan[c*x]*Log[1 
 + ((c^2*d + e + 2*Sqrt[c^2*d*e])*E^((2*I)*ArcTan[c*x]))/(c^2*d - e)] + 4* 
b^2*c^2*d*ArcSin[Sqrt[(c^2*d)/(c^2*d - e)]]*ArcTan[c*x]*Log[1 + ((c^2*d + 
e + 2*Sqrt[c^2*d*e])*E^((2*I)*ArcTan[c*x]))/(c^2*d - e)] - 4*b^2*c^2*d*Arc 
Tan[c*x]^2*Log[1 + ((c^2*d + e + 2*Sqrt[c^2*d*e])*E^((2*I)*ArcTan[c*x]))/( 
c^2*d - e)] - 4*a*b*c^2*d*ArcSin[Sqrt[(c^2*d)/(c^2*d - e)]]*Log[(-2*Sqrt[c 
^2*d*e]*E^((2*I)*ArcTan[c*x]) + e*(-1 + E^((2*I)*ArcTan[c*x])) + c^2*d*(1 
+ E^((2*I)*ArcTan[c*x])))/(c^2*d - e)] - 4*a*b*c^2*d*ArcTan[c*x]*Log[(-2*S 
qrt[c^2*d*e]*E^((2*I)*ArcTan[c*x]) + e*(-1 + E^((2*I)*ArcTan[c*x])) + c^2* 
d*(1 + E^((2*I)*ArcTan[c*x])))/(c^2*d - e)] - 4*b^2*c^2*d*ArcSin[Sqrt[(c^2 
*d)/(c^2*d - e)]]*ArcTan[c*x]*Log[(-2*Sqrt[c^2*d*e]*E^((2*I)*ArcTan[c*x]) 
+ e*(-1 + E^((2*I)*ArcTan[c*x])) + c^2*d*(1 + E^((2*I)*ArcTan[c*x])))/(c^2 
*d - e)] - 4*b^2*c^2*d*ArcTan[c*x]^2*Log[(-2*Sqrt[c^2*d*e]*E^((2*I)*ArcTan 
[c*x]) + e*(-1 + E^((2*I)*ArcTan[c*x])) + c^2*d*(1 + E^((2*I)*ArcTan[c*...
 
3.13.61.3 Rubi [A] (verified)

Time = 1.23 (sec) , antiderivative size = 579, normalized size of antiderivative = 0.98, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {5451, 5361, 5451, 2009, 5419, 5515, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {x^3 (a+b \arctan (c x))^2}{d+e x^2} \, dx\)

\(\Big \downarrow \) 5451

\(\displaystyle \frac {\int x (a+b \arctan (c x))^2dx}{e}-\frac {d \int \frac {x (a+b \arctan (c x))^2}{e x^2+d}dx}{e}\)

\(\Big \downarrow \) 5361

\(\displaystyle \frac {\frac {1}{2} x^2 (a+b \arctan (c x))^2-b c \int \frac {x^2 (a+b \arctan (c x))}{c^2 x^2+1}dx}{e}-\frac {d \int \frac {x (a+b \arctan (c x))^2}{e x^2+d}dx}{e}\)

\(\Big \downarrow \) 5451

\(\displaystyle \frac {\frac {1}{2} x^2 (a+b \arctan (c x))^2-b c \left (\frac {\int (a+b \arctan (c x))dx}{c^2}-\frac {\int \frac {a+b \arctan (c x)}{c^2 x^2+1}dx}{c^2}\right )}{e}-\frac {d \int \frac {x (a+b \arctan (c x))^2}{e x^2+d}dx}{e}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\frac {1}{2} x^2 (a+b \arctan (c x))^2-b c \left (\frac {a x+b x \arctan (c x)-\frac {b \log \left (c^2 x^2+1\right )}{2 c}}{c^2}-\frac {\int \frac {a+b \arctan (c x)}{c^2 x^2+1}dx}{c^2}\right )}{e}-\frac {d \int \frac {x (a+b \arctan (c x))^2}{e x^2+d}dx}{e}\)

\(\Big \downarrow \) 5419

\(\displaystyle \frac {\frac {1}{2} x^2 (a+b \arctan (c x))^2-b c \left (\frac {a x+b x \arctan (c x)-\frac {b \log \left (c^2 x^2+1\right )}{2 c}}{c^2}-\frac {(a+b \arctan (c x))^2}{2 b c^3}\right )}{e}-\frac {d \int \frac {x (a+b \arctan (c x))^2}{e x^2+d}dx}{e}\)

\(\Big \downarrow \) 5515

\(\displaystyle \frac {\frac {1}{2} x^2 (a+b \arctan (c x))^2-b c \left (\frac {a x+b x \arctan (c x)-\frac {b \log \left (c^2 x^2+1\right )}{2 c}}{c^2}-\frac {(a+b \arctan (c x))^2}{2 b c^3}\right )}{e}-\frac {d \int \left (\frac {(a+b \arctan (c x))^2}{2 \sqrt {e} \left (\sqrt {e} x+\sqrt {-d}\right )}-\frac {(a+b \arctan (c x))^2}{2 \sqrt {e} \left (\sqrt {-d}-\sqrt {e} x\right )}\right )dx}{e}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\frac {1}{2} x^2 (a+b \arctan (c x))^2-b c \left (\frac {a x+b x \arctan (c x)-\frac {b \log \left (c^2 x^2+1\right )}{2 c}}{c^2}-\frac {(a+b \arctan (c x))^2}{2 b c^3}\right )}{e}-\frac {d \left (-\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e}-\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {e} x+\sqrt {-d}\right )}{\left (\sqrt {-d} c+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e}+\frac {(a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{(1-i c x) \left (c \sqrt {-d}-i \sqrt {e}\right )}\right )}{2 e}+\frac {(a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{(1-i c x) \left (c \sqrt {-d}+i \sqrt {e}\right )}\right )}{2 e}+\frac {i b \operatorname {PolyLog}\left (2,1-\frac {2}{1-i c x}\right ) (a+b \arctan (c x))}{e}-\frac {\log \left (\frac {2}{1-i c x}\right ) (a+b \arctan (c x))^2}{e}+\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 e}+\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {e} x+\sqrt {-d}\right )}{\left (\sqrt {-d} c+i \sqrt {e}\right ) (1-i c x)}\right )}{4 e}-\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2}{1-i c x}\right )}{2 e}\right )}{e}\)

input
Int[(x^3*(a + b*ArcTan[c*x])^2)/(d + e*x^2),x]
 
output
((x^2*(a + b*ArcTan[c*x])^2)/2 - b*c*(-1/2*(a + b*ArcTan[c*x])^2/(b*c^3) + 
 (a*x + b*x*ArcTan[c*x] - (b*Log[1 + c^2*x^2])/(2*c))/c^2))/e - (d*(-(((a 
+ b*ArcTan[c*x])^2*Log[2/(1 - I*c*x)])/e) + ((a + b*ArcTan[c*x])^2*Log[(2* 
c*(Sqrt[-d] - Sqrt[e]*x))/((c*Sqrt[-d] - I*Sqrt[e])*(1 - I*c*x))])/(2*e) + 
 ((a + b*ArcTan[c*x])^2*Log[(2*c*(Sqrt[-d] + Sqrt[e]*x))/((c*Sqrt[-d] + I* 
Sqrt[e])*(1 - I*c*x))])/(2*e) + (I*b*(a + b*ArcTan[c*x])*PolyLog[2, 1 - 2/ 
(1 - I*c*x)])/e - ((I/2)*b*(a + b*ArcTan[c*x])*PolyLog[2, 1 - (2*c*(Sqrt[- 
d] - Sqrt[e]*x))/((c*Sqrt[-d] - I*Sqrt[e])*(1 - I*c*x))])/e - ((I/2)*b*(a 
+ b*ArcTan[c*x])*PolyLog[2, 1 - (2*c*(Sqrt[-d] + Sqrt[e]*x))/((c*Sqrt[-d] 
+ I*Sqrt[e])*(1 - I*c*x))])/e - (b^2*PolyLog[3, 1 - 2/(1 - I*c*x)])/(2*e) 
+ (b^2*PolyLog[3, 1 - (2*c*(Sqrt[-d] - Sqrt[e]*x))/((c*Sqrt[-d] - I*Sqrt[e 
])*(1 - I*c*x))])/(4*e) + (b^2*PolyLog[3, 1 - (2*c*(Sqrt[-d] + Sqrt[e]*x)) 
/((c*Sqrt[-d] + I*Sqrt[e])*(1 - I*c*x))])/(4*e)))/e
 

3.13.61.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 5361
Int[((a_.) + ArcTan[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> 
 Simp[x^(m + 1)*((a + b*ArcTan[c*x^n])^p/(m + 1)), x] - Simp[b*c*n*(p/(m + 
1))   Int[x^(m + n)*((a + b*ArcTan[c*x^n])^(p - 1)/(1 + c^2*x^(2*n))), x], 
x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0] && (EqQ[p, 1] || (EqQ[n, 1] & 
& IntegerQ[m])) && NeQ[m, -1]
 

rule 5419
Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)^2), x_Symbo 
l] :> Simp[(a + b*ArcTan[c*x])^(p + 1)/(b*c*d*(p + 1)), x] /; FreeQ[{a, b, 
c, d, e, p}, x] && EqQ[e, c^2*d] && NeQ[p, -1]
 

rule 5451
Int[(((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_))/((d_) + (e 
_.)*(x_)^2), x_Symbol] :> Simp[f^2/e   Int[(f*x)^(m - 2)*(a + b*ArcTan[c*x] 
)^p, x], x] - Simp[d*(f^2/e)   Int[(f*x)^(m - 2)*((a + b*ArcTan[c*x])^p/(d 
+ e*x^2)), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && GtQ[p, 0] && GtQ[m, 1]
 

rule 5515
Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_ 
.)*(x_)^2)^(q_.), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*ArcTan[c*x] 
)^p, (f*x)^m*(d + e*x^2)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d 
, e, f, m}, x] && IntegerQ[q] && IGtQ[p, 0] && ((EqQ[p, 1] && GtQ[q, 0]) || 
 IntegerQ[m])
 
3.13.61.4 Maple [F]

\[\int \frac {x^{3} \left (a +b \arctan \left (c x \right )\right )^{2}}{e \,x^{2}+d}d x\]

input
int(x^3*(a+b*arctan(c*x))^2/(e*x^2+d),x)
 
output
int(x^3*(a+b*arctan(c*x))^2/(e*x^2+d),x)
 
3.13.61.5 Fricas [F]

\[ \int \frac {x^3 (a+b \arctan (c x))^2}{d+e x^2} \, dx=\int { \frac {{\left (b \arctan \left (c x\right ) + a\right )}^{2} x^{3}}{e x^{2} + d} \,d x } \]

input
integrate(x^3*(a+b*arctan(c*x))^2/(e*x^2+d),x, algorithm="fricas")
 
output
integral((b^2*x^3*arctan(c*x)^2 + 2*a*b*x^3*arctan(c*x) + a^2*x^3)/(e*x^2 
+ d), x)
 
3.13.61.6 Sympy [F]

\[ \int \frac {x^3 (a+b \arctan (c x))^2}{d+e x^2} \, dx=\int \frac {x^{3} \left (a + b \operatorname {atan}{\left (c x \right )}\right )^{2}}{d + e x^{2}}\, dx \]

input
integrate(x**3*(a+b*atan(c*x))**2/(e*x**2+d),x)
 
output
Integral(x**3*(a + b*atan(c*x))**2/(d + e*x**2), x)
 
3.13.61.7 Maxima [F]

\[ \int \frac {x^3 (a+b \arctan (c x))^2}{d+e x^2} \, dx=\int { \frac {{\left (b \arctan \left (c x\right ) + a\right )}^{2} x^{3}}{e x^{2} + d} \,d x } \]

input
integrate(x^3*(a+b*arctan(c*x))^2/(e*x^2+d),x, algorithm="maxima")
 
output
1/2*a^2*(x^2/e - d*log(e*x^2 + d)/e^2) + integrate((b^2*x^3*arctan(c*x)^2 
+ 2*a*b*x^3*arctan(c*x))/(e*x^2 + d), x)
 
3.13.61.8 Giac [F]

\[ \int \frac {x^3 (a+b \arctan (c x))^2}{d+e x^2} \, dx=\int { \frac {{\left (b \arctan \left (c x\right ) + a\right )}^{2} x^{3}}{e x^{2} + d} \,d x } \]

input
integrate(x^3*(a+b*arctan(c*x))^2/(e*x^2+d),x, algorithm="giac")
 
output
sage0*x
 
3.13.61.9 Mupad [F(-1)]

Timed out. \[ \int \frac {x^3 (a+b \arctan (c x))^2}{d+e x^2} \, dx=\int \frac {x^3\,{\left (a+b\,\mathrm {atan}\left (c\,x\right )\right )}^2}{e\,x^2+d} \,d x \]

input
int((x^3*(a + b*atan(c*x))^2)/(d + e*x^2),x)
 
output
int((x^3*(a + b*atan(c*x))^2)/(d + e*x^2), x)